<?php
class tags_categoryModel extends baseModel{
    protected $table = 'tags_category';

    //TAG分类列表
    public function tags_category_list() {
        return $this->select('','','cid desc');
    }

    //TAG分类信息
    public function info($id) {
        return $this->find('cid='.$id);
    }

    //添加TAG分类
    public function add($data)
    {

        $data['sequence']=intval($data['sequence']);
        return $this->insert($data);
    }
    //编辑TAG分类
    public function edit($data)
    {
        $condition['cid']=intval($data['cid']);
        return $this->update($condition,$data); 
    }
    //删除TAG分类
    public function del($id)
    {
        //删除关联
        $this->delete('cid='.intval($id)); 
    }
    


	
}